#ifndef _GAMEPLAY_H_
#define _GAMEPLAY_H_

#include "../physics/world_entity.h"
#include "player.h"

class WorldArea;
class WorldProjectile;
class WorldEntity;
class WorldPlayer;
class World;
class Player;

extern World *world;

enum dirs {MOVE_LEFT = 1, MOVE_RIGHT = 2, MOVE_UP = 4, MOVE_DOWN = 8};

class GamePlay
{	
	public:
		/* metodo chiamato dal mouse handler per sparare un proiettile localmente, 
		 * dovra' esistere il metodo generico usato anche dai proiettili "remoti" */
		void localProjectileShooted(Player *player, float x, float y);
		
		void projectileShooted(int type, float x, float y, Vector2D vel, Vector2D acc, Vector2D gravity, WorldPlayer *owner);
		
		void playerJumped(Player *player);
		void playerIsMoving(Player *player, char type);
		void playerStopped(Player *player, char type);
		
		void switchedWeapon(Player *p, int slot);
		
		void collisionProjectileArea(WorldProjectile *projectile, WorldArea *area, float x, float y);
		
		void dmgMeeleWeaponRecived(Player *target, Player *source,/* MeeleWeapon *weapon, */ short hp);
		void dmgRangedWeaponRecived(Player *target, Player *source,/* RangedWeapon *weapon */ short hp);
		void dmgAbilityRecevied(Player *target, Player *source, /*Ability *ability */ short hp);
		
		/*TODO: implementare */
		void damagePlayersCircle(WorldPlayer *who, GLfloat x, GLfloat y, GLushort damage, char damageType);
		
	
	
};

#endif
